import { defineStore } from 'pinia'
import { ref } from 'vue'
import { getCategoryService } from '@/api/Layout'

export const useCategoryStore = defineStore('Category', () => {
  const categoryList = ref<Object[]>([])
  const getCategory = async () => {
    const res = await getCategoryService()
    categoryList.value = res.data.result
  }
  return {
    categoryList,
    getCategory
  }
})
